﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;

namespace Hrm.Core
{
    public class User : Entity
    {
        [MaxLength(50)]
        [Display(Name="用户编码")]
        public string Code { get; set; }

        [MaxLength(50)]
        [Display(Name = "用户名称")]
        public string Name { get; set; }

        [MaxLength(50)]
        [Display(Name = "用户密码")]
        public string Password { get; set; }

        [MaxLength(50)]
        [Display(Name = "用户电话")]
        public string Telephone { get; set; }

        public int? StaffId { get; set; }

        [JsonIgnore]
        public virtual ICollection<Role> Roles { get; set; }
    }
}
